Fix distcheck
authorMatthias Clasen <mclasen@redhat.com>
Tue, 21 Jul 2015 03:54:39 +0000 (23:54 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 21 Jul 2015 04:19:10 +0000 (00:19 -0400)
Makefile.decl does not work well with scripts that stay
in srcdir, so generate test-simplify from test-simplify.in,
just os that it ends up in builddir.

testsuite/tools/Makefile.am
testsuite/tools/test-simplify [deleted file]
testsuite/tools/test-simplify.in [new file with mode: 0755]

index 786bcccabb0a428dbd7bb8c52d863ca65bf9dd1c..c0fc0c3cddae543474394dd6657562097531e6e0 100644 (file)
@@ -15,7 +15,7 @@ test_simplify = \
 
 EXTRA_DIST += \
        $(test_simplify)        \
-       test-simplify           \
+       test-simplify.in        \
        $(NULL)
 
 TESTS_ENVIRONMENT = \
@@ -25,6 +25,9 @@ TEST_PROGS += \
        test-simplify   \
        $(NULL)
 
+test-simplify:test-simplify.in
+       $(AM_V_GEN) cp $< $@
+
 if BUILDOPT_INSTALL_TESTS
 insttestdir = $(libexecdir)/installed-tests/$(PACKAGE)
 insttest_SCRIPTS = $(TEST_PROGS)
@@ -39,6 +42,7 @@ test-simplify.test: test-simplify Makefile
 test_files = $(TEST_PROGS:=.test)
 
 DISTCLEANFILES = \
+       test-simplify           \
        $(test_files)           \
        $(NULL)
 
diff --git a/testsuite/tools/test-simplify b/testsuite/tools/test-simplify
deleted file mode 100755 (executable)
index 2de4366..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh
-
-GTK_BUILDER_TOOL=${GTK_BUILDER_TOOL:-gtk-builder-tool}
-TEST_DATA_DIR=${TEST_DATA_DIR:-./simplify}
-TEST_RESULT_DIR=${TEST_RESULT_DIR:-/tmp}
-
-shopt -s nullglob
-TESTS=( "$TEST_DATA_DIR"/*.ui )
-
-echo "1..${#TESTS}"
-
-I=1
-for t in ${TESTS[*]}; do
-  name=$(basename $t .ui)
-  expected="$TEST_DATA_DIR/$name.expected"
-  result="$TEST_RESULT_DIR/$name.out"
-
-  $GTK_BUILDER_TOOL simplify $t 2>/dev/null >$result
-
-  if diff "$expected" "$result" > /dev/null; then
-    echo "ok $I $name"
-  else
-    echo "not ok $I $name"
-  fi
-
-  I=$((I+1))
-done
diff --git a/testsuite/tools/test-simplify.in b/testsuite/tools/test-simplify.in
new file mode 100755 (executable)
index 0000000..2de4366
--- /dev/null
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+GTK_BUILDER_TOOL=${GTK_BUILDER_TOOL:-gtk-builder-tool}
+TEST_DATA_DIR=${TEST_DATA_DIR:-./simplify}
+TEST_RESULT_DIR=${TEST_RESULT_DIR:-/tmp}
+
+shopt -s nullglob
+TESTS=( "$TEST_DATA_DIR"/*.ui )
+
+echo "1..${#TESTS}"
+
+I=1
+for t in ${TESTS[*]}; do
+  name=$(basename $t .ui)
+  expected="$TEST_DATA_DIR/$name.expected"
+  result="$TEST_RESULT_DIR/$name.out"
+
+  $GTK_BUILDER_TOOL simplify $t 2>/dev/null >$result
+
+  if diff "$expected" "$result" > /dev/null; then
+    echo "ok $I $name"
+  else
+    echo "not ok $I $name"
+  fi
+
+  I=$((I+1))
+done